<?php 
    define('WP_USE_THEMES', false); 
    
    require('./wp-blog-header.php');

    // get_header();

    // ALL posts
    //
	/*if ( have_posts() ) {
		while ( have_posts() ) {
			the_post();
            
            if ( in_category('Class') )
            {
                // http://codex.wordpress.org/Template_Tags/the_title
                the_title("<b>", "</b></br>");
            } 
            else if ( in_category('Assignment') )
            {
                the_title("<i>", "</i></br>");
            }
		} // end while
	} // end if
    */

    // CERTAIN POSTS
    //
    // http://codex.wordpress.org/Template_Tags/get_posts
    $args = array( 'category'=>'Assignment', 'orderby' => 'postdate', 'order' => 'DESC', 'numberposts' => '2');
    $posts = get_posts($args);
    
    foreach($posts as $post) 
    {
        // http://codex.wordpress.org/Function_Reference/setup_postdata
        setup_postdata($post);
        
        // http://codex.wordpress.org/Template_Tags/get_permalink
        $permalink = get_permalink();

        the_title("<a href='" . $permalink . "'><i>", "</i></a></br>");
    }
?>


